<?php
declare(strict_types=1);

namespace app\admin\validate;

use think\Validate;


class CheckCols extends Validate
{
    protected $rule = [
        'name' => 'require|unique:cols',
        'alias' => 'require',
    ];

    protected $message = [
        'name.require' => '字段名称必须填写',
        'name.unique' => '字段己存在',

        'alias.require' => '别名填写',
    ];
    protected $scene = [
        'add'  =>  ['name', 'alias'],
        'edit'  =>  ['alias'],
    ];
}

